{% extends "base.html" %}
{% load satchmo.thumbnail %}

{% block extra-head %}
{% if category.meta %}
    <meta name="description" content="{{category.meta}}">
{% endif %}
{% endblock %}

{% block navbar %}

<a href="{{shop_base}}/">Home</a> 
{% for urls in category.get_url_name %}
    ::<a href="{{urls.1}}">{{ urls.0 }}</a>
{% endfor %}

{% endblock %}


{% block content %}
<div id="product_category">
<h3>{{ category.name }}</h3>
    <ul>
    {% for item in category.item_set.all %} 
            <li><a href="{{ item.get_absolute_url }}">
            <img src="{{media_url}}{{ item.main_image.get_picture_url|thumbnail:"width=85" }}" width="85" /> </a>
            <a href="{{ item.get_absolute_url }}">{{ item.verbose_name }}</a></li>
    {% endfor %}
    </ul>
{% if child_categories %}
        {% for cat in child_categories %}
            <h4> {{cat.name}} </h4>
            <ul>
            {% for item in cat.item_set.all %}
                <li><a href="{{ item.get_absolute_url }}">
                <img src="{{media_url}}{{ item.main_image.get_picture_url|thumbnail:"width=85" }}" width="85" /> </a>
                <a href="{{ item.get_absolute_url }}">{{ item.verbose_name }}</a></li>
            {% endfor %}
            </ul>
        {% endfor %}
{% endif %}
</div>
{% endblock %}
